package com.cloud.fast.generate;

import com.baomidou.mybatisplus.generator.config.rules.DbType;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class NutsGenerator extends BeginGenerator {
	String JDBC_URL = "jdbc:mysql://47.52.130.143:8206/nuts?characterEncoding=utf8&autoReconnect=true&useSSL=false";
	String JDBC_USERNAME = "nuts";
	String JDBC_PASSWORD = "Acoconut@2018";
	String JDBC_DIVER_CLASS_NAME = "com.mysql.jdbc.Driver";
	DbType DB_TYPE = DbType.MYSQL;

	/**
	 * 项目地址，例如：C:\\Users\\Admin\\git\\cloud-test1\\
	 */
	String PROJECT_DIR = "C:\\Users\\admin\\git\\user-service\\";
	/**
	 * 模块名（demo-api，demo-impl） ，例如：demo
	 */
	String MODULE_NAME = "user";
	/**
	 * 包的模块名(com.nuts.base)，例如：base
	 */
	String MODULE_PACKAGE = "user";
	/**
	 * 表名前缀，多个以,分隔
	 */
	String[] TABLE_PREFIX = new String[] { "nuts_" };
	/**
	 * 表名，多个以,分隔
	 */
	String[] TABLE_NAMES = new String[] { "nuts_user_account","nuts_user_account_balance" };
	/**
	 * 作者
	 */
	String AUTHOR = "weinan";

	// private static Connection getConn() {
	// String driver = "com.mysql.jdbc.Driver";
	// String url =
	// "jdbc:mysql://47.52.130.143:8206/nuts?characterEncoding=utf8&autoReconnect=true&useSSL=false";
	// String username = "nuts";
	// String password = "Acoconut@2018";
	// Connection conn = null;
	// try {
	// Class.forName(driver); //classLoader,加载对应驱动
	// conn = (Connection) DriverManager.getConnection(url, username, password);
	// } catch (ClassNotFoundException e) {
	// e.printStackTrace();
	// } catch (SQLException e) {
	// e.printStackTrace();
	// }
	// return conn;
	// }

	public static void main(String[] args) {
		// getConn();
		MpGenerator.BeginGenerator(new NutsGenerator());
		System.out.println();
	}
}
